<%@ Page Title="" Language="C#" Inherits="System.Web.Mvc.ViewPage<MvcCms.Data.ContentComment>" %>
<%= Html.ValidationSummary("Edit was unsuccessful. Please correct the errors and try again.") %>
<% using (Html.BeginForm())
   {%>
<p>
    <label for="AddedByIP">
        AddedByIP:</label>
    <%= Html.TextBox("AddedByIP", null, new { @readonly = "readonly" }) %>
    <%= Html.ValidationMessage("AddedByIP", "*") %>
</p>
<p>
    <label for="Body">
        Body:</label>
    <%= Html.TextArea("Body", Model.Body, new { @class="editcomment-ta" })%>
    <%= Html.ValidationMessage("Body", "*") %>
</p>
<%if (Model.User.UserName == "anonymous")
  { %>
<p>
    <label for="AddedByAnonEmail">
        AddedByAnonEmail:</label>
    <%= Html.TextBox("AddedByAnonEmail", Model.AddedByAnonEmail) %>
    <%= Html.ValidationMessage("AddedByAnonEmail", "*") %>
</p>
<p>
    <label for="AddedByAnonName">
        AddedByAnonName:</label>
    <%= Html.TextBox("AddedByAnonName", Model.AddedByAnonName) %>
    <%= Html.ValidationMessage("AddedByAnonName", "*") %>
</p>
<%}
  else
  { %>
<p>
    <label for="UserName">
        AddedBy UserName:</label>
    <%= Html.TextBox("User.UserName", null, new { @readonly = "readonly" })%>
    <%= Html.ValidationMessage("UserName", "*")%>
</p>
<p>
    <label for="UserName">
        AddedBy Email:</label>
    <%= Html.TextBox("User.Email", null, new { @readonly = "readonly" })%>
    <%= Html.ValidationMessage("Email", "*")%>
</p>
<%} %>
<p>
    <label for="Approved">
        Approved:</label>
    <%= Html.CheckBox("Approved", Model.Approved) %>
    <%= Html.ValidationMessage("Approved", "*") %>
</p>
<p>
    <input type="hidden" id="commentid" value="<%= Model.CommentID%>" />
    <input type="button" onclick="javascript: EditComment()" id="updateBut" value="Edit" />
</p>
<% } %>
